package com.edu.service.impl;

import java.util.List;

import com.edu.bean.Cars;
import com.edu.bean.Mycar;
import com.edu.bean.Page;
import com.edu.dao.MycarDao;
import com.edu.dao.impl.MycarDaoImpl;
import com.edu.service.MycarService;

public class MycarServiceImpl implements MycarService {
	MycarDao md = new MycarDaoImpl();
	@Override
	public Page<Mycar> selectCarimgAll(Mycar mycar, int pageNum, int pageSize) {
		List<Mycar> mycarpage=md.selectCarimgAll(pageNum, pageSize);
		int rows=md.selectMycartotal(mycar);
		Page<Mycar> page=new Page(mycarpage,pageNum, pageSize,rows);
		return page;
	}

	@Override
	public int deleteMycarById(int mycarid) {
		// TODO Auto-generated method stub
		return md.deleteMycarById(mycarid);
	}

	@Override
	public int updateMycar(Mycar mycar) {
		// TODO Auto-generated method stub
		return md.updateMycar(mycar);
	}

	@Override
	public Mycar selectMycarById(int mycarid) {
		// TODO Auto-generated method stub
		return md.selectMycarById(mycarid);
	}

	@Override
	public int addMycar(Mycar mycar) {
		// TODO Auto-generated method stub
		return md.addMycar(mycar);
	}

}
